/**
 * org.assess.oa.system.dao.TbDepartmentDAO
 */
package org.assess.oa.system.dao;

import java.util.List;
import java.util.Map;

import org.assess.oa.system.bean.TbDepartment;

/**
 * @description 操作部门表的DAO接口
 * @author XiaLongxiang
 * @createtime 2012-5-7 上午12:30:42
 */
public interface TbDepartmentDAO {
    /**
     * 根据department_code查询部门信息
     * @param department_code
     * @return
     */
    public TbDepartment queryTbDepartmentByCode(String department_code);
    
    /**
     * 查询部门信息，返回部门列表
     * @param paramters
     * @return
     */
    public List<TbDepartment> queryTbDepartmentAsList(Map<String, Object> parameters);
    
    /**
     * 根据上级部门编码(s)，递归查询出它所包含的下级部门
     * @param parameters
     * @return
     */
    public List<TbDepartment> queryTbDepartmentAsStartPrior(Map<String, Object> parameters);
    
    /**
     * 插入部门信息
     * @param tbDepartment
     * @return
     */
    public boolean insert(TbDepartment tbDepartment);
    
    /**
     * 修改部门信息
     * @param tbDepartment
     * @return
     */
    public boolean update(TbDepartment tbDepartment);
    
    /**
     * 修改部门信息的valid_flag标识
     * @param tbDepartment
     * @return
     */
    public boolean updateTbDepartmentValid(TbDepartment tbDepartment);
}
